/*
 * Main()
 */
package org.dbdir;

import org.dbdir.core.Logger;
import org.dbdir.test.LogTest;
import org.dbdir.test.TCPClientTester;

/**
 *
 * @author thotheolh
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        if (args.length != 0) {
            if (args[0].equals("client")) {
                System.out.println("Client");
                new Client();
            } else if (args[0].equals("server")) {
                System.out.println("Server");
                new Server().initServer();
            } else if (args[0].equals("tc")) {
                //Test Client
                TCPClientTester tester = new TCPClientTester(new Logger());
                tester.setVisible(true);
                tester.initConn();
            } else if (args[0].equals("testlog")) {
                new LogTest().start();
            } else {
                System.out.println("Defaulting to Server");
                new Server().initServer();
            }
        } else {
            System.out.println("Defaulting to Server");
            new Server().initServer();
        }
    }
}
